package com.itheima.ioTest_2;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;

public class user implements Serializable {
    private static final long serialVersionUID = 40L;
    private String uesrname;
    private transient String  password;
    public user() {
    }

    public user(String uesrname, String password) {
        this.uesrname = uesrname;
        this.password = password;
    }

    public String getUesrname() {
        return uesrname;
    }

    public void setUesrname(String uesrname) {
        this.uesrname = uesrname;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        user user = (user) o;

        if (uesrname != null ? !uesrname.equals(user.uesrname) : user.uesrname != null) return false;
        return password != null ? password.equals(user.password) : user.password == null;
    }

    @Override
    public int hashCode() {
        int result = uesrname != null ? uesrname.hashCode() : 0;
        result = 31 * result + (password != null ? password.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "user{" +
                "uesrname='" + uesrname + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
